{ "patcher" : { "fileversion" : 1, "appversion" : { "major" : 8, "minor" : 3, "revision" : 3, "architecture" : "x64", "modernui" : 1 } , "classnamespace" : "box", "rect" : [ 230.0, 114.0, 1131.0, 593.0 ], "bglocked" : 0, "openinpresentation" : 0, "default_fontsize" : 12.0, "default_fontface" : 0, "default_fontname" : "Arial", "gridonopen" : 1, "gridsize" : [ 15.0, 15.0 ], "gridsnaponopen" : 1, "objectsnaponopen" : 1, "statusbarvisible" : 2, "toolbarvisible" : 1, "lefttoolbarpinned" : 0, "toptoolbarpinned" : 0, "righttoolbarpinned" : 0, "bottomtoolbarpinned" : 0, "toolbars_unpinned_last_save" : 0, "tallnewobj" : 0, "boxanimatetime" : 200, "enablehscroll" : 1, "enablevscroll" : 1, "devicewidth" : 0.0, "description" : "", "digest" : "", "tags" : "", "style" : "", "subpatcher_template" : "", "assistshowspatchername" : 0, "boxes" : [ { "box" : { "id" : "obj-67", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 253.649963000000014, 455.0, 231.0, 20.0 ], "text" : "Each MIDI command takes about a msec!" } } , { "box" : { "id" : "obj-65", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 434.0, 274.799987999999985, 75.0, 20.0 ], "text" : "pgmchange " } } , { "box" : { "id" : "obj-64", "maxclass" : "button", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "bang" ], "parameter_enable" : 0, "patching_rect" : [ 239.178577714285723, 249.666687000000024, 24.0, 24.0 ] } } , { "box" : { "id" : "obj-62", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 424.357140428571483, 251.799988000000013, 50.0, 22.0 ] } } , { "box" : { "id" : "obj-58", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 691.892813571428633, 274.799987999999985, 79.0, 20.0 ], "presentation_linecount" : 2, "text" : "MIDI channel" } } , { "box" : { "id" : "obj-56", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 608.714265857142891, 250.799987999999985, 50.0, 22.0 ] } } , { "box" : { "id" : "obj-57", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 604.0, 274.799987999999985, 70.0, 20.0 ], "text" : "pitchbend" } } , { "box" : { "id" : "obj-52", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 515.714265857142891, 250.799987999999985, 50.0, 22.0 ] } } , { "box" : { "id" : "obj-35", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 385.357140428571427, 309.799987999999985, 92.0, 20.0 ], "text" : "controller value" } } , { "box" : { "id" : "obj-36", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 511.0, 274.799987999999985, 70.0, 20.0 ], "text" : "aftertouch" } } , { "box" : { "id" : "obj-7", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 700.071391285714299, 251.799988000000013, 50.0, 22.0 ] } } , { "box" : { "id" : "obj-28", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 300.666687000000024, 309.799987999999985, 70.0, 20.0 ], "text" : "controller #" } } , { "box" : { "id" : "obj-26", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 200.333359000000002, 314.0, 51.0, 20.0 ], "text" : "velocity" } } , { "box" : { "id" : "obj-9", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 138.666686999999996, 314.0, 53.0, 20.0 ], "text" : "keynum" } } , { "box" : { "fontsize" : 14.0, "id" : "obj-6", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 449.600006000000008, 99.0, 108.0, 22.0 ], "text" : "3. data2 (7 bits)" } } , { "box" : { "id" : "obj-20", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 792.249954000000002, 265.0, 89.0, 22.0 ], "text" : "print midievent" } } , { "box" : { "id" : "obj-12", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 208.883300999999989, 140.600006000000008, 153.0, 33.0 ], "text" : "This is called \"MIDI echo\" \n(midiin --> midiout)" } } , { "box" : { "fontname" : "Arial", "fontsize" : 14.0, "id" : "obj-25", "linecount" : 4, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 444.600006000000008, 128.600006000000008, 182.0, 69.0 ], "text" : "Example: \n(byte1) NOTEON/channel#\n(byte2) keynum\n(byte3) velocity" } } , { "box" : { "id" : "obj-24", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 253.649963000000014, 395.299987999999985, 465.0, 47.0 ], "text" : "The first bit of each byte is the SENTINAL BIT, which is why there are only 7 bits left. \n2^7=128 so there are 128 possible values. \nThe sentinal bit tells the receiver whether the byte is an opcode or data." } } , { "box" : { "fontname" : "Arial", "fontsize" : 14.0, "id" : "obj-22", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 449.600006000000008, 74.200019999999995, 117.0, 22.0 ], "text" : "2. data1 (7 bits) " } } , { "box" : { "fontsize" : 14.0, "id" : "obj-17", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 449.600006000000008, 47.800018000000001, 419.0, 22.0 ], "text" : "1. Opcode w/ MIDI channel (3 bits for opcode + 4 bits for channel)" } } , { "box" : { "fontsize" : 18.0, "id" : "obj-14", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 449.600006000000008, 10.0, 337.0, 27.0 ], "text" : "Each MIDI command consists of 3 bytes:" } } , { "box" : { "fontsize" : 36.0, "id" : "obj-8", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 26.666687, 22.800018000000001, 364.0, 47.0 ], "text" : "How does MIDI work?" } } , { "box" : { "id" : "obj-1", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 385.357140428571427, 285.799987999999985, 50.0, 22.0 ] } } , { "box" : { "id" : "obj-3", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 331.690514428571419, 285.799987999999985, 50.0, 22.0 ] } } , { "box" : { "id" : "obj-4", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "int", "int" ], "patching_rect" : [ 331.357140428571427, 251.799988000000013, 73.0, 22.0 ], "text" : "unpack i i" } } , { "box" : { "id" : "obj-16", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 170.600021999999996, 175.600006000000008, 53.283279, 22.0 ], "text" : "midiout" } } , { "box" : { "id" : "obj-15", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 204.883300999999989, 284.666687000000024, 50.0, 22.0 ] } } , { "box" : { "id" : "obj-13", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 147.333359000000002, 284.666687000000024, 50.0, 22.0 ] } } , { "box" : { "id" : "obj-11", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "int", "int" ], "patching_rect" : [ 147.000014999999991, 250.666687000000024, 76.883285999999998, 22.0 ], "text" : "unpack i i" } } , { "box" : { "id" : "obj-10", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 8, "outlettype" : [ "", "", "", "int", "int", "", "int", "" ], "patching_rect" : [ 147.000014999999991, 220.0, 664.24993900000004, 22.0 ], "text" : "midiparse" } } , { "box" : { "id" : "obj-2", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "patching_rect" : [ 147.000014999999991, 128.600006000000008, 55.883277999999997, 22.0 ], "text" : "midiin" } } ], "lines" : [ { "patchline" : { "destination" : [ "obj-11", 0 ], "source" : [ "obj-10", 0 ] } } , { "patchline" : { "destination" : [ "obj-20", 0 ], "source" : [ "obj-10", 7 ] } } , { "patchline" : { "destination" : [ "obj-4", 0 ], "source" : [ "obj-10", 2 ] } } , { "patchline" : { "destination" : [ "obj-52", 0 ], "source" : [ "obj-10", 4 ] } } , { "patchline" : { "destination" : [ "obj-56", 0 ], "source" : [ "obj-10", 5 ] } } , { "patchline" : { "destination" : [ "obj-62", 0 ], "source" : [ "obj-10", 3 ] } } , { "patchline" : { "destination" : [ "obj-64", 0 ], "source" : [ "obj-10", 1 ] } } , { "patchline" : { "destination" : [ "obj-7", 0 ], "source" : [ "obj-10", 6 ] } } , { "patchline" : { "destination" : [ "obj-13", 0 ], "source" : [ "obj-11", 0 ] } } , { "patchline" : { "destination" : [ "obj-15", 0 ], "source" : [ "obj-11", 1 ] } } , { "patchline" : { "destination" : [ "obj-10", 0 ], "order" : 1, "source" : [ "obj-2", 0 ] } } , { "patchline" : { "destination" : [ "obj-16", 0 ], "order" : 0, "source" : [ "obj-2", 0 ] } } , { "patchline" : { "destination" : [ "obj-1", 0 ], "source" : [ "obj-4", 1 ] } } , { "patchline" : { "destination" : [ "obj-3", 0 ], "source" : [ "obj-4", 0 ] } } ], "dependency_cache" : [ ], "autosave" : 0 } }